goto error_out;
}
- // Get number of vcpus, stored by pyxc_hvm_build()
- xc_get_hvm_param(xc_handle, dom, HVM_PARAM_VCPUS, &vcpus);
+ domctl.cmd = XEN_DOMCTL_getdomaininfo;
+ domctl.domain = (domid_t)dom;
+ if (xc_domctl(xc_handle, &domctl) < 0) {
+ PERROR("Could not get info on domain");
+ goto error_out;
+ }
+
+ vcpus = domctl.u.getdomaininfo.max_vcpu_id + 1;
// Hand-off state passed to guest firmware
if (xc_ia64_build_hob(xc_handle, dom, dom_memsize, vcpus) < 0) {
&image, &vcpus, &pae, &acpi, &apic) )
return NULL;
-#if defined(__ia64__)
- /* Set vcpus to later be retrieved in setup_guest() */
- xc_set_hvm_param(self->xc_handle, dom, HVM_PARAM_VCPUS, vcpus);
-#endif
if ( xc_hvm_build(self->xc_handle, dom, memsize, image) != 0 )
return pyxc_error_to_exception();
/* WARNING: before changing this, check that shared_info fits on a page */
#define MAX_VIRT_CPUS 64
-/*
- * HVM_PARAM_PAE_ENABLED is meaningless on ia64, so we overload this
- * entry to store the number of vCPUs. XXX Need arch-specific extentions
- * for xc_get/set_hvm_param().
- */
-#define HVM_PARAM_VCPUS HVM_PARAM_PAE_ENABLED
-
#ifndef __ASSEMBLY__
typedef unsigned long xen_ulong_t;